<html>
<head><meta charset="utf-8"><title>ring on embedded systems · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/ring.20on.20embedded.20systems.html">ring on embedded systems</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="223493709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/ring%20on%20embedded%20systems/near/223493709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> 83a <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/ring.20on.20embedded.20systems.html#223493709">(Jan 21 2021 at 11:03)</a>:</h4>
<p>I wanted to use <a href="https://crates.io/crates/rumqttc">rumqttc</a> on a embedded device (target = <code>mips-unknown-linux-musl</code>) but it fails at a custom build command for ring. It <a href="https://github.com/briansmith/ring/issues/713">seems</a> like ring does not support building for musl targets. I'm new to rust and cross compiling so perhaps I do something wrong?</p>
<p>The whole error message:</p>
<div class="codehilite"><pre><span></span><code>error: failed to run custom build command for `ring v0.16.19`

Caused by:
  process didn&#39;t exit successfully: `/home/83a/Code/ev/rust_test/hello_world/target/release/build/ring-a6c015645fcb51f3/build-script-build` (exit code: 101)
  --- stderr
  thread &#39;main&#39; panicked at &#39;called `Option::unwrap()` on a `None` value&#39;, /home/83a/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.19/build.rs:375:10
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/a4cbb44ae2c80545db957763b502dc7f6ea22085/library/std/src/panicking.rs:493:5
     1: core::panicking::panic_fmt
</code></pre></div>
<p>The panic seems to happen <a href="https://github.com/briansmith/ring/blob/main/build.rs#L357">here</a> </p>
<p>Thanks!</p>



<a name="223495649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/ring%20on%20embedded%20systems/near/223495649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/ring.20on.20embedded.20systems.html#223495649">(Jan 21 2021 at 11:26)</a>:</h4>
<p>There is no mips support for ring yet. Only x86, arm and wasm are supported. Some assembly will need to be written for mips.</p>



<a name="223497983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/ring%20on%20embedded%20systems/near/223497983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> 83a <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/ring.20on.20embedded.20systems.html#223497983">(Jan 21 2021 at 11:54)</a>:</h4>
<p>Okay. Then I will need to rethink my project. Nevertheless thanks for your help, now I can be sure it's not a problem on my side.</p>



<a name="223567561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/ring%20on%20embedded%20systems/near/223567561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Elichai Turkel <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/ring.20on.20embedded.20systems.html#223567561">(Jan 21 2021 at 20:41)</a>:</h4>
<p><span class="user-mention" data-user-id="133214">@briansmith</span></p>



<a name="223573899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/ring%20on%20embedded%20systems/near/223573899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> 83a <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/ring.20on.20embedded.20systems.html#223573899">(Jan 21 2021 at 21:36)</a>:</h4>
<p>Currently I've settled with <code>paho-mqtt</code> and <code>features = ["vendored-ssl"]</code> which to my own surprise could be compiled for my target.</p>



<a name="223592129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/ring%20on%20embedded%20systems/near/223592129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> briansmith <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/ring.20on.20embedded.20systems.html#223592129">(Jan 22 2021 at 01:02)</a>:</h4>
<p>I'm not planning to add any MIPS assembly to <em>ring</em> but I am planning to make it so there is a Rust fallback that can be used on MIPS and other platforms we don't have assembly for, and I'm planning to replace more assembly code with Rust code. There are a few PRs open to make progress in this area.</p>



<a name="224692488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/ring%20on%20embedded%20systems/near/224692488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/ring.20on.20embedded.20systems.html#224692488">(Feb 01 2021 at 07:21)</a>:</h4>
<p>Is that going to depend on LLVM support, or on subtle, or on some other mechanism to support constant time operations?</p>



<a name="224692546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/ring%20on%20embedded%20systems/near/224692546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/ring.20on.20embedded.20systems.html#224692546">(Feb 01 2021 at 07:22)</a>:</h4>
<p>I would certainly love to be able to cross compile more easily, and ring is sometimes the only library in my dependency tree containing non-Rust code.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>